package sy.dao.demo.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Repository;

import sy.dao.base.impl.BaseDaoImpl;
import sy.dao.demo.DemoUserDao;
import sy.model.demo.DemoUser;

/**
 * 自己的dao实现类要继承baseDaoImpl，并且实现自己的接口
 * 
 * @author 孙宇
 *
 */
@Repository("demoUserDao")
public class DemoUserDaoImpl extends BaseDaoImpl<DemoUser, Long> implements DemoUserDao {

	@Override
	public Map<String, Object> getBySql(Long id) {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("id", id);
		return super.getBySql("select * from tuser t where t.id = :id", params);
	}

}
